from docx import Document

def save():
    doc = Document()
    doc.add_heading('标题', level=1)
    doc.add_paragraph('段落内容')
    doc.save('demo.docx')

def read():
    doc = Document('demo.docx')
    for para in doc.paragraphs:
        print(para.text)


if __name__ == '__main__':
    # save()
    read()